package com.qdlc.p2p.dal.dto;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.qdlc.p2p.common.constant.Global;

/**
 * 上传图片表
 *
 * @author liya
 * @version 1.1.0.0
 */
@Entity
@Table(name = Global.DB_PREFIX + "borrow_upload")
public class BorrowUpload {

    /**
     * 抵押实物照
     *//*
    public static final int MORTGAGE_PHYSICAL = 1;
	*//**
     * 抵押档案照
     *//*
    public static final int MORTGAGE_ARCHIVES = 2;
	*//**
     * 担保函
     *//*
	public static final int GUARANTEE = 3;
	*/
	/*
	*//**
     * 手动生成的借款合同
     *//*
	public static final int CONTRACT = 5;*/


    /** 主键ID */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private long id;

    /** 借款标 */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "borrow_id")
    private Borrow borrow;

    /** 抵押物 */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "mortgage_id")
    private BorrowMortgage borrowMortgage;

    /**
     * 图片类型 1，抵押实物照 2，抵押档案照 3，担保函,4借款资料图片（显示于标详情页）,5后台上传合同，6缩略图（显示于标详情页）
     */
    private int type;

    /** 图片路径 */
    private String picPath;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public Borrow getBorrow() {
        return borrow;
    }

    public void setBorrow(Borrow borrow) {
        this.borrow = borrow;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public BorrowMortgage getBorrowMortgage() {
        return borrowMortgage;
    }

    public void setBorrowMortgage(BorrowMortgage borrowMortgage) {
        this.borrowMortgage = borrowMortgage;
    }

    public String getPicPath() {
        return picPath;
    }

    public void setPicPath(String picPath) {
        this.picPath = picPath;
    }
}